package com.letoken.platform.repo.app.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 公链表
 * </p>
 *
 * @author 作者
 * @since 2022-11-18
 */
@Getter
@Setter
@TableName("blockchain")
@ApiModel(value = "Blockchain对象", description = "公链表")
public class Blockchain extends Model<Blockchain> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("所属网络")
    @TableField("network")
    private String network;

    @ApiModelProperty("网络ID")
    @TableField("network_id")
    private String networkId;

    @ApiModelProperty("公链类型(简称)")
    @TableField("net_type")
    private String netType;

    @ApiModelProperty("icon图片url")
    @TableField("icon_url")
    private String iconUrl;

    @ApiModelProperty("名称(全名)")
    @TableField("name")
    private String name;

    @ApiModelProperty("是否使用 0-否 1-是")
    @TableField("is_use")
    private Integer isUse;

    @ApiModelProperty("排序，从大到小")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("网络类型(1主网 2测试网)")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("节点链接RPC地址")
    @TableField("rpc_url")
    private String rpcUrl;

    @ApiModelProperty("代币符号")
    @TableField("token_symbol")
    private String tokenSymbol;

    @ApiModelProperty("区块链浏览器")
    @TableField("blockchain_browser")
    private String blockchainBrowser;

    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("是否删除 0-否 1-是")
    @TableField("is_delete")
    private Integer isDelete;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
